Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Working With Pictures and PICT Files


DrawPictureFile

The DrawPictureFile function draws an image from a specified picture file (PICT file) in the current graphics port. Your program also specifies the destination rectangle for the image.

pascal OSErr DrawPictureFile (short refNum, const Rect *frame,
                            ProgressProcRecordPtr progressProc);
refNum
Contains a file reference number for the source PICT file.
frame
Contains a pointer to the rectangle into which the image is to be loaded. The compressor scales the source image to fit into this destination rectangle.
progressProc
Points to a progress function structure. During the operation, the draw function may occasionally call a function you provide in order to report its progress (see "Progress Functions" beginning on page 3-146 for more information about progress functions). If you have not provided a progress function, set this parameter to nil. If you pass a value of -1, you obtain a standard progress function.
DESCRIPTION
The DrawPictureFile function is essentially the same as QuickDraw's DrawPicture routine, except that DrawPictureFile reads the picture from disk. (For details on DrawPicture, see Inside Macintosh: Imaging.) The Image Compression Manager performs any spooling that may be necessary when reading the picture file.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
codecAbortErr-8967Operation aborted by the progress function
File Manager errors


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996